#pragma once
#include <cstring>
#include <fstream>
#include <iostream>
#include <string>
#include <msclr\marshal_cppstd.h>
#include "Teach.h"
#include "Stu.h"
#include "Off.h"
#include "Ren.h"
#include <algorithm>
using namespace std;

namespace Project {

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;
	
	/// <summary>
	/// Summary for Up
	/// </summary>
	public ref class Up : public System::Windows::Forms::Form
	{
		int cnt;
		
	public:
		
		Up(void)
		{
			
			InitializeComponent();
			fillcombo();
			//
			//TODO: Add the constructor code here
			//
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~Up()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::TabPage^  tabPage3;
	protected:
	private: System::Windows::Forms::TabPage^  tabPage4;
	private: System::Windows::Forms::ComboBox^  comboBox1;
	private: System::Windows::Forms::TextBox^  textBox4;
	private: System::Windows::Forms::TextBox^  textBox5;
	private: System::Windows::Forms::TextBox^  textBox6;
	private: System::Windows::Forms::TextBox^  textBox7;
	private: System::Windows::Forms::Label^  label9;
	private: System::Windows::Forms::Label^  label8;
	private: System::Windows::Forms::TabControl^  tabControl1;
	private: System::Windows::Forms::TabPage^  tabPage1;
	private: System::Windows::Forms::TabPage^  tabPage2;
	private: System::Windows::Forms::Label^  label6;
	private: System::Windows::Forms::Label^  label5;
	private: System::Windows::Forms::TextBox^  textBox3;
	private: System::Windows::Forms::TextBox^  textBox2;
	private: System::Windows::Forms::Label^  label4;
	private: System::Windows::Forms::Label^  label3;
	private: System::Windows::Forms::Label^  label2;
	private: System::Windows::Forms::Button^  button2;
	private: System::Windows::Forms::Button^  button1;

	private: System::Windows::Forms::ComboBox^  comboBox2;
	private: System::Windows::Forms::Label^  label10;
	private: System::Windows::Forms::TextBox^  textBox1;
	private: System::Windows::Forms::TextBox^  textBox8;
	private: System::Windows::Forms::TextBox^  textBox9;
	private: System::Windows::Forms::TextBox^  textBox11;
	private: System::Windows::Forms::Label^  label1;
	private: System::Windows::Forms::Label^  label7;
	private: System::Windows::Forms::Label^  label11;
	private: System::Windows::Forms::Label^  label12;
	private: System::Windows::Forms::TextBox^  textBox13;
	private: System::Windows::Forms::Label^  label13;
	private: System::Windows::Forms::Label^  label14;
	private: System::Windows::Forms::ComboBox^  comboBox4;
	private: System::Windows::Forms::TextBox^  textBox10;
	private: System::Windows::Forms::TextBox^  textBox12;
	private: System::Windows::Forms::TextBox^  textBox14;
	private: System::Windows::Forms::TextBox^  textBox15;
	private: System::Windows::Forms::Label^  label15;
	private: System::Windows::Forms::Label^  label16;
	private: System::Windows::Forms::Label^  label17;
	private: System::Windows::Forms::Label^  label18;
	private: System::Windows::Forms::TextBox^  textBox16;
	private: System::Windows::Forms::TextBox^  textBox17;
	private: System::Windows::Forms::Label^  label19;
	private: System::Windows::Forms::Label^  label20;
	private: System::Windows::Forms::Label^  label21;
	private: System::Windows::Forms::ComboBox^  comboBox6;

	private: System::Windows::Forms::TextBox^  textBox18;
	private: System::Windows::Forms::TextBox^  textBox19;
	private: System::Windows::Forms::Label^  label22;
	private: System::Windows::Forms::Label^  label23;
	private: System::Windows::Forms::Label^  label24;
	private: System::Windows::Forms::Label^  label25;
	private: System::Windows::Forms::TextBox^  textBox20;
	private: System::Windows::Forms::TextBox^  textBox21;
	private: System::Windows::Forms::Button^  button4;
	private: System::Windows::Forms::Button^  button3;
	private: System::Windows::Forms::Button^  button6;

	private: System::Windows::Forms::Button^  button8;
	private: System::Windows::Forms::Button^  button7;
	private: System::Windows::Forms::Button^  button5;
	private: System::Windows::Forms::Button^  button9;
	private: System::Windows::Forms::GroupBox^  groupBox3;
	private: System::Windows::Forms::GroupBox^  groupBox4;
	private: System::Windows::Forms::GroupBox^  groupBox1;
	private: System::Windows::Forms::GroupBox^  groupBox2;
	private: System::Windows::Forms::Button^  button10;
	private: System::Windows::Forms::Button^  button11;
	private: System::Windows::Forms::Button^  button12;

	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(Up::typeid));
			this->tabPage3 = (gcnew System::Windows::Forms::TabPage());
			this->button10 = (gcnew System::Windows::Forms::Button());
			this->groupBox3 = (gcnew System::Windows::Forms::GroupBox());
			this->textBox10 = (gcnew System::Windows::Forms::TextBox());
			this->label21 = (gcnew System::Windows::Forms::Label());
			this->label20 = (gcnew System::Windows::Forms::Label());
			this->comboBox4 = (gcnew System::Windows::Forms::ComboBox());
			this->label19 = (gcnew System::Windows::Forms::Label());
			this->textBox17 = (gcnew System::Windows::Forms::TextBox());
			this->textBox12 = (gcnew System::Windows::Forms::TextBox());
			this->textBox16 = (gcnew System::Windows::Forms::TextBox());
			this->textBox14 = (gcnew System::Windows::Forms::TextBox());
			this->label18 = (gcnew System::Windows::Forms::Label());
			this->textBox15 = (gcnew System::Windows::Forms::TextBox());
			this->label17 = (gcnew System::Windows::Forms::Label());
			this->label15 = (gcnew System::Windows::Forms::Label());
			this->label16 = (gcnew System::Windows::Forms::Label());
			this->button4 = (gcnew System::Windows::Forms::Button());
			this->button3 = (gcnew System::Windows::Forms::Button());
			this->tabPage4 = (gcnew System::Windows::Forms::TabPage());
			this->button9 = (gcnew System::Windows::Forms::Button());
			this->groupBox4 = (gcnew System::Windows::Forms::GroupBox());
			this->label24 = (gcnew System::Windows::Forms::Label());
			this->label25 = (gcnew System::Windows::Forms::Label());
			this->label23 = (gcnew System::Windows::Forms::Label());
			this->textBox21 = (gcnew System::Windows::Forms::TextBox());
			this->label22 = (gcnew System::Windows::Forms::Label());
			this->comboBox6 = (gcnew System::Windows::Forms::ComboBox());
			this->textBox19 = (gcnew System::Windows::Forms::TextBox());
			this->textBox18 = (gcnew System::Windows::Forms::TextBox());
			this->button5 = (gcnew System::Windows::Forms::Button());
			this->button6 = (gcnew System::Windows::Forms::Button());
			this->comboBox1 = (gcnew System::Windows::Forms::ComboBox());
			this->textBox4 = (gcnew System::Windows::Forms::TextBox());
			this->textBox5 = (gcnew System::Windows::Forms::TextBox());
			this->textBox6 = (gcnew System::Windows::Forms::TextBox());
			this->textBox7 = (gcnew System::Windows::Forms::TextBox());
			this->label9 = (gcnew System::Windows::Forms::Label());
			this->label8 = (gcnew System::Windows::Forms::Label());
			this->tabControl1 = (gcnew System::Windows::Forms::TabControl());
			this->tabPage1 = (gcnew System::Windows::Forms::TabPage());
			this->button11 = (gcnew System::Windows::Forms::Button());
			this->groupBox1 = (gcnew System::Windows::Forms::GroupBox());
			this->textBox20 = (gcnew System::Windows::Forms::TextBox());
			this->label14 = (gcnew System::Windows::Forms::Label());
			this->label13 = (gcnew System::Windows::Forms::Label());
			this->textBox13 = (gcnew System::Windows::Forms::TextBox());
			this->comboBox2 = (gcnew System::Windows::Forms::ComboBox());
			this->label12 = (gcnew System::Windows::Forms::Label());
			this->label10 = (gcnew System::Windows::Forms::Label());
			this->label11 = (gcnew System::Windows::Forms::Label());
			this->textBox1 = (gcnew System::Windows::Forms::TextBox());
			this->label7 = (gcnew System::Windows::Forms::Label());
			this->textBox8 = (gcnew System::Windows::Forms::TextBox());
			this->label1 = (gcnew System::Windows::Forms::Label());
			this->textBox9 = (gcnew System::Windows::Forms::TextBox());
			this->textBox11 = (gcnew System::Windows::Forms::TextBox());
			this->button8 = (gcnew System::Windows::Forms::Button());
			this->button7 = (gcnew System::Windows::Forms::Button());
			this->tabPage2 = (gcnew System::Windows::Forms::TabPage());
			this->button12 = (gcnew System::Windows::Forms::Button());
			this->groupBox2 = (gcnew System::Windows::Forms::GroupBox());
			this->label2 = (gcnew System::Windows::Forms::Label());
			this->label3 = (gcnew System::Windows::Forms::Label());
			this->label4 = (gcnew System::Windows::Forms::Label());
			this->textBox2 = (gcnew System::Windows::Forms::TextBox());
			this->textBox3 = (gcnew System::Windows::Forms::TextBox());
			this->label5 = (gcnew System::Windows::Forms::Label());
			this->label6 = (gcnew System::Windows::Forms::Label());
			this->button2 = (gcnew System::Windows::Forms::Button());
			this->button1 = (gcnew System::Windows::Forms::Button());
			this->tabPage3->SuspendLayout();
			this->groupBox3->SuspendLayout();
			this->tabPage4->SuspendLayout();
			this->groupBox4->SuspendLayout();
			this->tabControl1->SuspendLayout();
			this->tabPage1->SuspendLayout();
			this->groupBox1->SuspendLayout();
			this->tabPage2->SuspendLayout();
			this->groupBox2->SuspendLayout();
			this->SuspendLayout();
			// 
			// tabPage3
			// 
			this->tabPage3->BackgroundImage = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"tabPage3.BackgroundImage")));
			this->tabPage3->Controls->Add(this->button10);
			this->tabPage3->Controls->Add(this->groupBox3);
			this->tabPage3->Controls->Add(this->button4);
			this->tabPage3->Controls->Add(this->button3);
			this->tabPage3->Location = System::Drawing::Point(4, 22);
			this->tabPage3->Name = L"tabPage3";
			this->tabPage3->Padding = System::Windows::Forms::Padding(3);
			this->tabPage3->Size = System::Drawing::Size(657, 424);
			this->tabPage3->TabIndex = 2;
			this->tabPage3->Text = L"Officers";
			this->tabPage3->UseVisualStyleBackColor = true;
			// 
			// button10
			// 
			this->button10->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
				static_cast<System::Byte>(0)));
			this->button10->Location = System::Drawing::Point(443, 346);
			this->button10->Name = L"button10";
			this->button10->Size = System::Drawing::Size(78, 30);
			this->button10->TabIndex = 66;
			this->button10->Text = L"Exit";
			this->button10->UseVisualStyleBackColor = true;
			this->button10->Click += gcnew System::EventHandler(this, &Up::button10_Click);
			// 
			// groupBox3
			// 
			this->groupBox3->Controls->Add(this->textBox10);
			this->groupBox3->Controls->Add(this->label21);
			this->groupBox3->Controls->Add(this->label20);
			this->groupBox3->Controls->Add(this->comboBox4);
			this->groupBox3->Controls->Add(this->label19);
			this->groupBox3->Controls->Add(this->textBox17);
			this->groupBox3->Controls->Add(this->textBox12);
			this->groupBox3->Controls->Add(this->textBox16);
			this->groupBox3->Controls->Add(this->textBox14);
			this->groupBox3->Controls->Add(this->label18);
			this->groupBox3->Controls->Add(this->textBox15);
			this->groupBox3->Controls->Add(this->label17);
			this->groupBox3->Controls->Add(this->label15);
			this->groupBox3->Controls->Add(this->label16);
			this->groupBox3->Location = System::Drawing::Point(156, 42);
			this->groupBox3->Name = L"groupBox3";
			this->groupBox3->Size = System::Drawing::Size(266, 238);
			this->groupBox3->TabIndex = 65;
			this->groupBox3->TabStop = false;
			this->groupBox3->Text = L"Update Officers";
			// 
			// textBox10
			// 
			this->textBox10->Location = System::Drawing::Point(121, 111);
			this->textBox10->Name = L"textBox10";
			this->textBox10->Size = System::Drawing::Size(100, 20);
			this->textBox10->TabIndex = 61;
			// 
			// label21
			// 
			this->label21->AutoSize = true;
			this->label21->Location = System::Drawing::Point(27, 33);
			this->label21->Name = L"label21";
			this->label21->Size = System::Drawing::Size(18, 13);
			this->label21->TabIndex = 48;
			this->label21->Text = L"ID";
			// 
			// label20
			// 
			this->label20->AutoSize = true;
			this->label20->Location = System::Drawing::Point(27, 59);
			this->label20->Name = L"label20";
			this->label20->Size = System::Drawing::Size(35, 13);
			this->label20->TabIndex = 49;
			this->label20->Text = L"Name";
			// 
			// comboBox4
			// 
			this->comboBox4->FormattingEnabled = true;
			this->comboBox4->Location = System::Drawing::Point(121, 33);
			this->comboBox4->Name = L"comboBox4";
			this->comboBox4->Size = System::Drawing::Size(121, 21);
			this->comboBox4->TabIndex = 62;
			this->comboBox4->SelectedIndexChanged += gcnew System::EventHandler(this, &Up::comboBox4_SelectedIndexChanged);
			// 
			// label19
			// 
			this->label19->AutoSize = true;
			this->label19->Location = System::Drawing::Point(27, 85);
			this->label19->Name = L"label19";
			this->label19->Size = System::Drawing::Size(26, 13);
			this->label19->TabIndex = 50;
			this->label19->Text = L"Age";
			// 
			// textBox17
			// 
			this->textBox17->Location = System::Drawing::Point(121, 59);
			this->textBox17->Name = L"textBox17";
			this->textBox17->Size = System::Drawing::Size(100, 20);
			this->textBox17->TabIndex = 52;
			// 
			// textBox12
			// 
			this->textBox12->Location = System::Drawing::Point(121, 139);
			this->textBox12->Name = L"textBox12";
			this->textBox12->Size = System::Drawing::Size(100, 20);
			this->textBox12->TabIndex = 60;
			// 
			// textBox16
			// 
			this->textBox16->Location = System::Drawing::Point(121, 85);
			this->textBox16->Name = L"textBox16";
			this->textBox16->Size = System::Drawing::Size(100, 20);
			this->textBox16->TabIndex = 53;
			// 
			// textBox14
			// 
			this->textBox14->Location = System::Drawing::Point(121, 165);
			this->textBox14->Name = L"textBox14";
			this->textBox14->Size = System::Drawing::Size(100, 20);
			this->textBox14->TabIndex = 59;
			// 
			// label18
			// 
			this->label18->AutoSize = true;
			this->label18->Location = System::Drawing::Point(27, 139);
			this->label18->Name = L"label18";
			this->label18->Size = System::Drawing::Size(65, 13);
			this->label18->TabIndex = 54;
			this->label18->Text = L"Qualification";
			// 
			// textBox15
			// 
			this->textBox15->Location = System::Drawing::Point(121, 190);
			this->textBox15->Name = L"textBox15";
			this->textBox15->Size = System::Drawing::Size(100, 20);
			this->textBox15->TabIndex = 58;
			// 
			// label17
			// 
			this->label17->AutoSize = true;
			this->label17->Location = System::Drawing::Point(27, 111);
			this->label17->Name = L"label17";
			this->label17->Size = System::Drawing::Size(52, 13);
			this->label17->TabIndex = 55;
			this->label17->Text = L"Office No";
			// 
			// label15
			// 
			this->label15->AutoSize = true;
			this->label15->Location = System::Drawing::Point(27, 190);
			this->label15->Name = L"label15";
			this->label15->Size = System::Drawing::Size(45, 13);
			this->label15->TabIndex = 57;
			this->label15->Text = L"Address";
			// 
			// label16
			// 
			this->label16->AutoSize = true;
			this->label16->Location = System::Drawing::Point(27, 165);
			this->label16->Name = L"label16";
			this->label16->Size = System::Drawing::Size(36, 13);
			this->label16->TabIndex = 56;
			this->label16->Text = L"Salary";
			// 
			// button4
			// 
			this->button4->Location = System::Drawing::Point(509, 277);
			this->button4->Name = L"button4";
			this->button4->Size = System::Drawing::Size(75, 23);
			this->button4->TabIndex = 64;
			this->button4->Text = L"Deete";
			this->button4->UseVisualStyleBackColor = true;
			this->button4->Click += gcnew System::EventHandler(this, &Up::button4_Click);
			// 
			// button3
			// 
			this->button3->Location = System::Drawing::Point(428, 277);
			this->button3->Name = L"button3";
			this->button3->Size = System::Drawing::Size(75, 23);
			this->button3->TabIndex = 63;
			this->button3->Text = L"Update";
			this->button3->UseVisualStyleBackColor = true;
			this->button3->Click += gcnew System::EventHandler(this, &Up::button3_Click);
			// 
			// tabPage4
			// 
			this->tabPage4->BackgroundImage = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"tabPage4.BackgroundImage")));
			this->tabPage4->Controls->Add(this->button9);
			this->tabPage4->Controls->Add(this->groupBox4);
			this->tabPage4->Controls->Add(this->button5);
			this->tabPage4->Controls->Add(this->button6);
			this->tabPage4->Location = System::Drawing::Point(4, 22);
			this->tabPage4->Name = L"tabPage4";
			this->tabPage4->Padding = System::Windows::Forms::Padding(3);
			this->tabPage4->Size = System::Drawing::Size(657, 424);
			this->tabPage4->TabIndex = 3;
			this->tabPage4->Text = L"Renowned Students";
			this->tabPage4->UseVisualStyleBackColor = true;
			// 
			// button9
			// 
			this->button9->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
				static_cast<System::Byte>(0)));
			this->button9->ForeColor = System::Drawing::SystemColors::ActiveCaptionText;
			this->button9->Location = System::Drawing::Point(454, 345);
			this->button9->Name = L"button9";
			this->button9->Size = System::Drawing::Size(74, 30);
			this->button9->TabIndex = 12;
			this->button9->Text = L"Exit";
			this->button9->UseVisualStyleBackColor = true;
			this->button9->Click += gcnew System::EventHandler(this, &Up::button9_Click);
			// 
			// groupBox4
			// 
			this->groupBox4->Controls->Add(this->label24);
			this->groupBox4->Controls->Add(this->label25);
			this->groupBox4->Controls->Add(this->label23);
			this->groupBox4->Controls->Add(this->textBox21);
			this->groupBox4->Controls->Add(this->label22);
			this->groupBox4->Controls->Add(this->comboBox6);
			this->groupBox4->Controls->Add(this->textBox19);
			this->groupBox4->Controls->Add(this->textBox18);
			this->groupBox4->Location = System::Drawing::Point(179, 60);
			this->groupBox4->Name = L"groupBox4";
			this->groupBox4->Size = System::Drawing::Size(241, 172);
			this->groupBox4->TabIndex = 35;
			this->groupBox4->TabStop = false;
			this->groupBox4->Text = L"Update Renownrd Students";
			// 
			// label24
			// 
			this->label24->AutoSize = true;
			this->label24->Location = System::Drawing::Point(17, 61);
			this->label24->Name = L"label24";
			this->label24->Size = System::Drawing::Size(35, 13);
			this->label24->TabIndex = 22;
			this->label24->Text = L"Batch";
			// 
			// label25
			// 
			this->label25->AutoSize = true;
			this->label25->Location = System::Drawing::Point(17, 35);
			this->label25->Name = L"label25";
			this->label25->Size = System::Drawing::Size(35, 13);
			this->label25->TabIndex = 21;
			this->label25->Text = L"Name";
			// 
			// label23
			// 
			this->label23->AutoSize = true;
			this->label23->Location = System::Drawing::Point(17, 87);
			this->label23->Name = L"label23";
			this->label23->Size = System::Drawing::Size(62, 13);
			this->label23->TabIndex = 23;
			this->label23->Text = L"Occupation";
			// 
			// textBox21
			// 
			this->textBox21->Location = System::Drawing::Point(106, 62);
			this->textBox21->Name = L"textBox21";
			this->textBox21->Size = System::Drawing::Size(100, 20);
			this->textBox21->TabIndex = 31;
			// 
			// label22
			// 
			this->label22->AutoSize = true;
			this->label22->Location = System::Drawing::Point(17, 113);
			this->label22->Name = L"label22";
			this->label22->Size = System::Drawing::Size(74, 13);
			this->label22->TabIndex = 24;
			this->label22->Text = L"Achievements";
			// 
			// comboBox6
			// 
			this->comboBox6->FormattingEnabled = true;
			this->comboBox6->Location = System::Drawing::Point(106, 35);
			this->comboBox6->Name = L"comboBox6";
			this->comboBox6->Size = System::Drawing::Size(121, 21);
			this->comboBox6->TabIndex = 30;
			this->comboBox6->SelectedIndexChanged += gcnew System::EventHandler(this, &Up::comboBox6_SelectedIndexChanged);
			// 
			// textBox19
			// 
			this->textBox19->Location = System::Drawing::Point(106, 87);
			this->textBox19->Name = L"textBox19";
			this->textBox19->Size = System::Drawing::Size(100, 20);
			this->textBox19->TabIndex = 27;
			// 
			// textBox18
			// 
			this->textBox18->Location = System::Drawing::Point(106, 113);
			this->textBox18->Name = L"textBox18";
			this->textBox18->Size = System::Drawing::Size(100, 20);
			this->textBox18->TabIndex = 28;
			// 
			// button5
			// 
			this->button5->Location = System::Drawing::Point(428, 275);
			this->button5->Name = L"button5";
			this->button5->Size = System::Drawing::Size(75, 23);
			this->button5->TabIndex = 34;
			this->button5->Text = L"Update";
			this->button5->UseVisualStyleBackColor = true;
			this->button5->Click += gcnew System::EventHandler(this, &Up::button5_Click);
			// 
			// button6
			// 
			this->button6->Location = System::Drawing::Point(509, 275);
			this->button6->Name = L"button6";
			this->button6->Size = System::Drawing::Size(75, 23);
			this->button6->TabIndex = 33;
			this->button6->Text = L"Delete";
			this->button6->UseVisualStyleBackColor = true;
			this->button6->Click += gcnew System::EventHandler(this, &Up::button6_Click);
			// 
			// comboBox1
			// 
			this->comboBox1->FormattingEnabled = true;
			this->comboBox1->Location = System::Drawing::Point(100, 35);
			this->comboBox1->Name = L"comboBox1";
			this->comboBox1->Size = System::Drawing::Size(121, 21);
			this->comboBox1->TabIndex = 62;
			this->comboBox1->SelectedIndexChanged += gcnew System::EventHandler(this, &Up::comboBox1_SelectedIndexChanged);
			// 
			// textBox4
			// 
			this->textBox4->Location = System::Drawing::Point(100, 113);
			this->textBox4->Name = L"textBox4";
			this->textBox4->Size = System::Drawing::Size(100, 20);
			this->textBox4->TabIndex = 61;
			// 
			// textBox5
			// 
			this->textBox5->Location = System::Drawing::Point(100, 141);
			this->textBox5->Name = L"textBox5";
			this->textBox5->Size = System::Drawing::Size(100, 20);
			this->textBox5->TabIndex = 60;
			// 
			// textBox6
			// 
			this->textBox6->Location = System::Drawing::Point(100, 167);
			this->textBox6->Name = L"textBox6";
			this->textBox6->Size = System::Drawing::Size(100, 20);
			this->textBox6->TabIndex = 59;
			// 
			// textBox7
			// 
			this->textBox7->Location = System::Drawing::Point(100, 192);
			this->textBox7->Name = L"textBox7";
			this->textBox7->Size = System::Drawing::Size(100, 20);
			this->textBox7->TabIndex = 58;
			// 
			// label9
			// 
			this->label9->AutoSize = true;
			this->label9->Location = System::Drawing::Point(6, 192);
			this->label9->Name = L"label9";
			this->label9->Size = System::Drawing::Size(45, 13);
			this->label9->TabIndex = 57;
			this->label9->Text = L"Address";
			// 
			// label8
			// 
			this->label8->AutoSize = true;
			this->label8->Location = System::Drawing::Point(6, 167);
			this->label8->Name = L"label8";
			this->label8->Size = System::Drawing::Size(36, 13);
			this->label8->TabIndex = 56;
			this->label8->Text = L"Salary";
			// 
			// tabControl1
			// 
			this->tabControl1->Controls->Add(this->tabPage1);
			this->tabControl1->Controls->Add(this->tabPage2);
			this->tabControl1->Controls->Add(this->tabPage3);
			this->tabControl1->Controls->Add(this->tabPage4);
			this->tabControl1->Location = System::Drawing::Point(0, 3);
			this->tabControl1->Name = L"tabControl1";
			this->tabControl1->SelectedIndex = 0;
			this->tabControl1->Size = System::Drawing::Size(665, 450);
			this->tabControl1->TabIndex = 1;
			// 
			// tabPage1
			// 
			this->tabPage1->BackgroundImage = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"tabPage1.BackgroundImage")));
			this->tabPage1->Controls->Add(this->button11);
			this->tabPage1->Controls->Add(this->groupBox1);
			this->tabPage1->Controls->Add(this->button8);
			this->tabPage1->Controls->Add(this->button7);
			this->tabPage1->Location = System::Drawing::Point(4, 22);
			this->tabPage1->Name = L"tabPage1";
			this->tabPage1->Padding = System::Windows::Forms::Padding(3);
			this->tabPage1->Size = System::Drawing::Size(657, 424);
			this->tabPage1->TabIndex = 0;
			this->tabPage1->Text = L"Students";
			this->tabPage1->UseVisualStyleBackColor = true;
			// 
			// button11
			// 
			this->button11->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
				static_cast<System::Byte>(0)));
			this->button11->Location = System::Drawing::Point(457, 339);
			this->button11->Name = L"button11";
			this->button11->Size = System::Drawing::Size(75, 30);
			this->button11->TabIndex = 52;
			this->button11->Text = L"Exit";
			this->button11->UseVisualStyleBackColor = true;
			this->button11->Click += gcnew System::EventHandler(this, &Up::button11_Click);
			// 
			// groupBox1
			// 
			this->groupBox1->Controls->Add(this->textBox20);
			this->groupBox1->Controls->Add(this->label14);
			this->groupBox1->Controls->Add(this->label13);
			this->groupBox1->Controls->Add(this->textBox13);
			this->groupBox1->Controls->Add(this->comboBox2);
			this->groupBox1->Controls->Add(this->label12);
			this->groupBox1->Controls->Add(this->label10);
			this->groupBox1->Controls->Add(this->label11);
			this->groupBox1->Controls->Add(this->textBox1);
			this->groupBox1->Controls->Add(this->label7);
			this->groupBox1->Controls->Add(this->textBox8);
			this->groupBox1->Controls->Add(this->label1);
			this->groupBox1->Controls->Add(this->textBox9);
			this->groupBox1->Controls->Add(this->textBox11);
			this->groupBox1->Location = System::Drawing::Point(159, 41);
			this->groupBox1->Name = L"groupBox1";
			this->groupBox1->Size = System::Drawing::Size(251, 239);
			this->groupBox1->TabIndex = 51;
			this->groupBox1->TabStop = false;
			this->groupBox1->Text = L"Update Students";
			// 
			// textBox20
			// 
			this->textBox20->Location = System::Drawing::Point(100, 105);
			this->textBox20->Name = L"textBox20";
			this->textBox20->Size = System::Drawing::Size(100, 20);
			this->textBox20->TabIndex = 48;
			// 
			// label14
			// 
			this->label14->AutoSize = true;
			this->label14->Location = System::Drawing::Point(8, 52);
			this->label14->Name = L"label14";
			this->label14->Size = System::Drawing::Size(35, 13);
			this->label14->TabIndex = 33;
			this->label14->Text = L"Name";
			// 
			// label13
			// 
			this->label13->AutoSize = true;
			this->label13->Location = System::Drawing::Point(8, 79);
			this->label13->Name = L"label13";
			this->label13->Size = System::Drawing::Size(26, 13);
			this->label13->TabIndex = 34;
			this->label13->Text = L"Age";
			// 
			// textBox13
			// 
			this->textBox13->Location = System::Drawing::Point(100, 52);
			this->textBox13->Name = L"textBox13";
			this->textBox13->Size = System::Drawing::Size(100, 20);
			this->textBox13->TabIndex = 35;
			// 
			// comboBox2
			// 
			this->comboBox2->FormattingEnabled = true;
			this->comboBox2->Location = System::Drawing::Point(99, 25);
			this->comboBox2->Name = L"comboBox2";
			this->comboBox2->Size = System::Drawing::Size(121, 21);
			this->comboBox2->TabIndex = 47;
			this->comboBox2->SelectedIndexChanged += gcnew System::EventHandler(this, &Up::comboBox2_SelectedIndexChanged);
			// 
			// label12
			// 
			this->label12->AutoSize = true;
			this->label12->Location = System::Drawing::Point(8, 105);
			this->label12->Name = L"label12";
			this->label12->Size = System::Drawing::Size(32, 13);
			this->label12->TabIndex = 37;
			this->label12->Text = L"Class";
			// 
			// label10
			// 
			this->label10->AutoSize = true;
			this->label10->Location = System::Drawing::Point(8, 26);
			this->label10->Name = L"label10";
			this->label10->Size = System::Drawing::Size(25, 13);
			this->label10->TabIndex = 46;
			this->label10->Text = L"Roll";
			// 
			// label11
			// 
			this->label11->AutoSize = true;
			this->label11->Location = System::Drawing::Point(8, 132);
			this->label11->Name = L"label11";
			this->label11->Size = System::Drawing::Size(71, 13);
			this->label11->TabIndex = 38;
			this->label11->Text = L"Fathers name";
			// 
			// textBox1
			// 
			this->textBox1->Location = System::Drawing::Point(99, 183);
			this->textBox1->Name = L"textBox1";
			this->textBox1->Size = System::Drawing::Size(100, 20);
			this->textBox1->TabIndex = 45;
			// 
			// label7
			// 
			this->label7->AutoSize = true;
			this->label7->Location = System::Drawing::Point(8, 160);
			this->label7->Name = L"label7";
			this->label7->Size = System::Drawing::Size(76, 13);
			this->label7->TabIndex = 39;
			this->label7->Text = L"Mothers Name";
			// 
			// textBox8
			// 
			this->textBox8->Location = System::Drawing::Point(99, 157);
			this->textBox8->Name = L"textBox8";
			this->textBox8->Size = System::Drawing::Size(100, 20);
			this->textBox8->TabIndex = 44;
			// 
			// label1
			// 
			this->label1->AutoSize = true;
			this->label1->Location = System::Drawing::Point(8, 184);
			this->label1->Name = L"label1";
			this->label1->Size = System::Drawing::Size(45, 13);
			this->label1->TabIndex = 40;
			this->label1->Text = L"Address";
			// 
			// textBox9
			// 
			this->textBox9->Location = System::Drawing::Point(99, 131);
			this->textBox9->Name = L"textBox9";
			this->textBox9->Size = System::Drawing::Size(100, 20);
			this->textBox9->TabIndex = 43;
			// 
			// textBox11
			// 
			this->textBox11->Location = System::Drawing::Point(100, 78);
			this->textBox11->Name = L"textBox11";
			this->textBox11->Size = System::Drawing::Size(100, 20);
			this->textBox11->TabIndex = 41;
			// 
			// button8
			// 
			this->button8->Location = System::Drawing::Point(509, 278);
			this->button8->Name = L"button8";
			this->button8->Size = System::Drawing::Size(75, 23);
			this->button8->TabIndex = 50;
			this->button8->Text = L"Delete";
			this->button8->UseVisualStyleBackColor = true;
			this->button8->Click += gcnew System::EventHandler(this, &Up::button8_Click);
			// 
			// button7
			// 
			this->button7->Location = System::Drawing::Point(428, 278);
			this->button7->Name = L"button7";
			this->button7->Size = System::Drawing::Size(75, 23);
			this->button7->TabIndex = 49;
			this->button7->Text = L"Update";
			this->button7->UseVisualStyleBackColor = true;
			this->button7->Click += gcnew System::EventHandler(this, &Up::button7_Click);
			// 
			// tabPage2
			// 
			this->tabPage2->BackgroundImage = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"tabPage2.BackgroundImage")));
			this->tabPage2->Controls->Add(this->button12);
			this->tabPage2->Controls->Add(this->groupBox2);
			this->tabPage2->Controls->Add(this->button2);
			this->tabPage2->Controls->Add(this->button1);
			this->tabPage2->Location = System::Drawing::Point(4, 22);
			this->tabPage2->Name = L"tabPage2";
			this->tabPage2->Padding = System::Windows::Forms::Padding(3);
			this->tabPage2->Size = System::Drawing::Size(657, 424);
			this->tabPage2->TabIndex = 1;
			this->tabPage2->Text = L"Teachers";
			this->tabPage2->UseVisualStyleBackColor = true;
			// 
			// button12
			// 
			this->button12->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
				static_cast<System::Byte>(0)));
			this->button12->Location = System::Drawing::Point(438, 342);
			this->button12->Name = L"button12";
			this->button12->Size = System::Drawing::Size(75, 23);
			this->button12->TabIndex = 66;
			this->button12->Text = L"Exit";
			this->button12->UseVisualStyleBackColor = true;
			this->button12->Click += gcnew System::EventHandler(this, &Up::button12_Click);
			// 
			// groupBox2
			// 
			this->groupBox2->Controls->Add(this->textBox4);
			this->groupBox2->Controls->Add(this->label2);
			this->groupBox2->Controls->Add(this->label3);
			this->groupBox2->Controls->Add(this->comboBox1);
			this->groupBox2->Controls->Add(this->label4);
			this->groupBox2->Controls->Add(this->textBox2);
			this->groupBox2->Controls->Add(this->textBox5);
			this->groupBox2->Controls->Add(this->textBox3);
			this->groupBox2->Controls->Add(this->textBox6);
			this->groupBox2->Controls->Add(this->label5);
			this->groupBox2->Controls->Add(this->textBox7);
			this->groupBox2->Controls->Add(this->label6);
			this->groupBox2->Controls->Add(this->label9);
			this->groupBox2->Controls->Add(this->label8);
			this->groupBox2->Location = System::Drawing::Point(165, 31);
			this->groupBox2->Name = L"groupBox2";
			this->groupBox2->Size = System::Drawing::Size(243, 245);
			this->groupBox2->TabIndex = 65;
			this->groupBox2->TabStop = false;
			this->groupBox2->Text = L"Update Teachers";
			// 
			// label2
			// 
			this->label2->AutoSize = true;
			this->label2->Location = System::Drawing::Point(6, 35);
			this->label2->Name = L"label2";
			this->label2->Size = System::Drawing::Size(16, 13);
			this->label2->TabIndex = 49;
			this->label2->Text = L"Id";
			// 
			// label3
			// 
			this->label3->AutoSize = true;
			this->label3->Location = System::Drawing::Point(6, 61);
			this->label3->Name = L"label3";
			this->label3->Size = System::Drawing::Size(35, 13);
			this->label3->TabIndex = 50;
			this->label3->Text = L"Name";
			// 
			// label4
			// 
			this->label4->AutoSize = true;
			this->label4->Location = System::Drawing::Point(6, 87);
			this->label4->Name = L"label4";
			this->label4->Size = System::Drawing::Size(26, 13);
			this->label4->TabIndex = 51;
			this->label4->Text = L"Age";
			// 
			// textBox2
			// 
			this->textBox2->Location = System::Drawing::Point(100, 61);
			this->textBox2->Name = L"textBox2";
			this->textBox2->Size = System::Drawing::Size(100, 20);
			this->textBox2->TabIndex = 52;
			// 
			// textBox3
			// 
			this->textBox3->Location = System::Drawing::Point(100, 87);
			this->textBox3->Name = L"textBox3";
			this->textBox3->Size = System::Drawing::Size(100, 20);
			this->textBox3->TabIndex = 53;
			// 
			// label5
			// 
			this->label5->AutoSize = true;
			this->label5->Location = System::Drawing::Point(6, 141);
			this->label5->Name = L"label5";
			this->label5->Size = System::Drawing::Size(65, 13);
			this->label5->TabIndex = 54;
			this->label5->Text = L"Qualification";
			// 
			// label6
			// 
			this->label6->AutoSize = true;
			this->label6->Location = System::Drawing::Point(6, 113);
			this->label6->Name = L"label6";
			this->label6->Size = System::Drawing::Size(52, 13);
			this->label6->TabIndex = 55;
			this->label6->Text = L"Office No";
			// 
			// button2
			// 
			this->button2->Location = System::Drawing::Point(483, 273);
			this->button2->Name = L"button2";
			this->button2->Size = System::Drawing::Size(75, 23);
			this->button2->TabIndex = 64;
			this->button2->Text = L"Delete";
			this->button2->UseVisualStyleBackColor = true;
			this->button2->Click += gcnew System::EventHandler(this, &Up::button2_Click);
			// 
			// button1
			// 
			this->button1->Location = System::Drawing::Point(402, 273);
			this->button1->Name = L"button1";
			this->button1->Size = System::Drawing::Size(75, 23);
			this->button1->TabIndex = 63;
			this->button1->Text = L"Update";
			this->button1->UseVisualStyleBackColor = true;
			this->button1->Click += gcnew System::EventHandler(this, &Up::button1_Click);
			// 
			// Up
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(668, 450);
			this->Controls->Add(this->tabControl1);
			this->Name = L"Up";
			this->Text = L"Update Form";
			this->tabPage3->ResumeLayout(false);
			this->groupBox3->ResumeLayout(false);
			this->groupBox3->PerformLayout();
			this->tabPage4->ResumeLayout(false);
			this->groupBox4->ResumeLayout(false);
			this->groupBox4->PerformLayout();
			this->tabControl1->ResumeLayout(false);
			this->tabPage1->ResumeLayout(false);
			this->groupBox1->ResumeLayout(false);
			this->groupBox1->PerformLayout();
			this->tabPage2->ResumeLayout(false);
			this->groupBox2->ResumeLayout(false);
			this->groupBox2->PerformLayout();
			this->ResumeLayout(false);

		}
#pragma endregion
	
	private: void fillcombo(void)
	{
				 Teach t[100];
				 ifstream file("TeachInfo.txt");
				 cnt = 0;
				 msclr::interop::marshal_context context;
				 while (file >> t[cnt].name){
					 file >> t[cnt].id;
					 String ^ user_name = context.marshal_as<String ^>(t[cnt].id);
					 comboBox1->Items->Add(user_name);
					 file >> t[cnt].age;
					 file >> t[cnt].office_no;
					 file >> t[cnt].qualification;
					 file >> t[cnt].salary;
					 file >> t[cnt].address;
					 cnt++;
				 }
				 file.close();

				 Stu s[100];
				 ifstream file1("StuInfo.txt");
				 cnt = 0;
				 while (file1 >> s[cnt].name){
					 file1 >> s[cnt].roll;
					 String ^ u = context.marshal_as<String ^>(s[cnt].roll);
					 comboBox2->Items->Add(u);
					 file1 >> s[cnt].age;
					 file1 >> s[cnt].clas;
					 file1 >> s[cnt].fathers_name;
					 file1 >> s[cnt].mothers_name;
					 file1 >> s[cnt].address;
					 cnt++;
				 }
				 file1.close();

				 Off o[100];
				 ifstream file2("OffInfo.txt");
				 cnt = 0;
				 while (file2 >> o[cnt].name){
					 file2 >> o[cnt].id;
					 String ^ u = context.marshal_as<String ^>(o[cnt].id);
					 comboBox4->Items->Add(u);
					 file2 >> o[cnt].age;
					 file2 >> o[cnt].office_no;
					 file2 >> o[cnt].qualification;
					 file2 >> o[cnt].salary;
					 file2 >> o[cnt].address;
					 cnt++;
				 }
				 file2.close();

				 Ren r[100];
				 ifstream file3("ren.txt");
				 cnt = 0;
				 while (file3 >> r[cnt].name){
					 String ^ u = context.marshal_as<String ^>(r[cnt].name);
					 comboBox6->Items->Add(u);
					 file3 >> r[cnt].batch;
					 file3 >> r[cnt].occupation;
					 file3 >> r[cnt].achievement;
					 cnt++;
				 }
				 file3.close();

	}
			 //
	private: System::Void comboBox1_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) {
				 Teach t[100];
				 ifstream file("TeachInfo.txt");
				 cnt = 0;
				 while (file >> t[cnt].name){
					 file >> t[cnt].id;
					 file >> t[cnt].age;
					 file >> t[cnt].office_no;
					 file >> t[cnt].qualification;
					 file >> t[cnt].salary;
					 file >> t[cnt].address;
					 cnt++;
				 }
				 file.close();
				 String ^ a = comboBox1->Text;
				 msclr::interop::marshal_context context;
				 string  user_name = context.marshal_as<string >(a);
				 String^ us;
				 for (int i = 0; i<cnt; i++){
					 if (t[i].id == user_name){
						 replace(t[i].name.begin(), t[i].name.end(), '~', ' ');
						 us = context.marshal_as<String ^>(t[i].name);
						 textBox2->Text = us;
						 replace(t[i].age.begin(), t[i].age.end(), '~', ' ');
						 us = context.marshal_as<String ^>(t[i].age);
						 textBox3->Text = us;
						 replace(t[i].office_no.begin(), t[i].office_no.end(), '~', ' ');
						 us = context.marshal_as<String ^>(t[i].office_no);
						 textBox4->Text = us;
						 replace(t[i].qualification.begin(), t[i].qualification.end(), '~', ' ');
						 us = context.marshal_as<String ^>(t[i].qualification);
						 textBox5->Text = us;
						 replace(t[i].salary.begin(), t[i].salary.end(), '~', ' ');
						 us = context.marshal_as<String ^>(t[i].salary);
						 textBox6->Text = us;
						 replace(t[i].name.begin(), t[i].name.end(), '~', ' ');
						 us = context.marshal_as<String ^>(t[i].address);
						 textBox7->Text = us;
					 }
				 }
	}
	
	private: System::Void comboBox2_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) {
				 Stu s[100];
				 ifstream file1("StuInfo.txt");
				 cnt = 0;
				 while (file1 >> s[cnt].name){
					 file1 >> s[cnt].roll;
					 file1 >> s[cnt].age;
					 file1 >> s[cnt].clas;
					 file1 >> s[cnt].fathers_name;
					 file1 >> s[cnt].mothers_name;
					 file1 >> s[cnt].address;
					 cnt++;
				 }
				 file1.close();

				 String ^ a = comboBox2->Text;
				 msclr::interop::marshal_context context;
				 string  user_name = context.marshal_as<string >(a);
				 String^ us;
				 for (int i = 0; i<cnt; i++){
					 if (s[i].roll == user_name){
						 replace(s[i].name.begin(), s[i].name.end(), '~', ' ');
						 us = context.marshal_as<String ^>(s[i].name);
						 textBox13->Text = us;
						 replace(s[i].age.begin(), s[i].age.end(), '~', ' ');
						 us = context.marshal_as<String ^>(s[i].age);
						 textBox11->Text = us;
						 replace(s[i].clas.begin(), s[i].clas.end(), '~', ' ');
						 us = context.marshal_as<String ^>(s[i].clas);
						 textBox20->Text = us;
						 replace(s[i].fathers_name.begin(), s[i].fathers_name.end(), '~', ' ');
						 us = context.marshal_as<String ^>(s[i].fathers_name);
						 textBox9->Text = us;
						 replace(s[i].mothers_name.begin(), s[i].mothers_name.end(), '~', ' ');
						 us = context.marshal_as<String ^>(s[i].mothers_name);
						 textBox8->Text = us;
						 replace(s[i].address.begin(), s[i].address.end(), '~', ' ');
						 us = context.marshal_as<String ^>(s[i].address);
						 textBox1->Text = us;
					 }
				 }
	}
	private: System::Void comboBox4_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) {
				 Off o[100];
				 ifstream file2("OffInfo.txt");
				 cnt = 0;
				 while (file2 >> o[cnt].name){
					 file2 >> o[cnt].id;
					 file2 >> o[cnt].age;
					 file2 >> o[cnt].office_no;
					 file2 >> o[cnt].qualification;
					 file2 >> o[cnt].salary;
					 file2 >> o[cnt].address;
					 cnt++;
				 }
				 file2.close();

				 String ^ a = comboBox4->Text;
				 msclr::interop::marshal_context context;
				 string  user_name = context.marshal_as<string >(a);
				 String^ us;
				 for (int i = 0; i<cnt; i++){
					 if (o[i].id == user_name){
						 replace(o[i].name.begin(), o[i].name.end(), '~', ' ');
						 us = context.marshal_as<String ^>(o[i].name);
						 textBox17->Text = us;
						 replace(o[i].age.begin(), o[i].age.end(), '~', ' ');
						 us = context.marshal_as<String ^>(o[i].age);
						 textBox16->Text = us;
						 replace(o[i].office_no.begin(), o[i].office_no.end(), '~', ' ');
						 us = context.marshal_as<String ^>(o[i].office_no);
						 textBox10->Text = us;
						 replace(o[i].qualification.begin(), o[i].qualification.end(), '~', ' ');
						 us = context.marshal_as<String ^>(o[i].qualification);
						 textBox12->Text = us;
						 replace(o[i].salary.begin(), o[i].salary.end(), '~', ' ');
						 us = context.marshal_as<String ^>(o[i].salary);
						 textBox14->Text = us;
						 replace(o[i].address.begin(), o[i].address.end(), '~', ' ');
						 us = context.marshal_as<String ^>(o[i].address);
						 textBox15->Text = us;
					 }
				 }
	}
	
	private: System::Void comboBox6_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) {
				 Ren r[100];
				 ifstream file3("ren.txt");
				 cnt = 0;
				 while (file3 >> r[cnt].name){
					 file3 >> r[cnt].batch;
					 file3 >> r[cnt].occupation;
					 file3 >> r[cnt].achievement;
					 cnt++;
				 }
				 file3.close();

				 String ^ a = comboBox6->Text;
				 msclr::interop::marshal_context context;
				 string  user_name = context.marshal_as<string >(a);
				 String^ us;
				 for (int i = 0; i<cnt; i++){
					 if (r[i].name == user_name){
						 replace(r[i].batch.begin(), r[i].batch.end(), '~', ' ');
						 us = context.marshal_as<String ^>(r[i].batch);
						 textBox21->Text = us;
						 replace(r[i].occupation.begin(), r[i].occupation.end(), '~', ' ');
						 us = context.marshal_as<String ^>(r[i].occupation);
						 textBox19->Text = us;
						 replace(r[i].achievement.begin(), r[i].achievement.end(), '~', ' ');
						 us = context.marshal_as<String ^>(r[i].achievement);
						 textBox18->Text = us;
					 }
				 }
	}
			 //
	private: System::Void button7_Click(System::Object^  sender, System::EventArgs^  e) {
				 Stu s[100];
				 ifstream file1("StuInfo.txt");
				 cnt = 0;
				 while (file1 >> s[cnt].name){
					 file1 >> s[cnt].roll;
					 file1 >> s[cnt].age;
					 file1 >> s[cnt].clas;
					 file1 >> s[cnt].fathers_name;
					 file1 >> s[cnt].mothers_name;
					 file1 >> s[cnt].address;
					 cnt++;
				 }
				 file1.close();

				 ofstream file2("StuInfo.txt");
				 msclr::interop::marshal_context context;
				 string  roll = context.marshal_as<string >(comboBox2->Text);
				 string  clas = context.marshal_as<string >(textBox20->Text);
				 for (int i = 0; i < cnt; i++){
					 if (s[i].roll == roll && s[i].clas == clas){
						 s[i].name = context.marshal_as<string >(textBox13->Text);
						 
						 s[i].age = context.marshal_as<string >(textBox11->Text);
						 
						 s[i].fathers_name = context.marshal_as<string>(textBox9->Text);
						 
						 s[i].mothers_name = context.marshal_as<string>(textBox8->Text);
						 
						 s[i].address = context.marshal_as<string>(textBox1->Text);
					 }
					 //replace with s;
					 replace(s[i].name.begin(), s[i].name.end(), ' ', '~');
					 replace(s[i].roll.begin(), s[i].roll.end(), ' ', '~');
					 replace(s[i].age.begin(), s[i].age.end(), ' ', '~');
					 replace(s[i].clas.begin(), s[i].clas.end(), ' ', '~');
					 replace(s[i].fathers_name.begin(), s[i].fathers_name.end(), ' ', '~');
					 replace(s[i].mothers_name.begin(), s[i].mothers_name.end(), ' ', '~');
					 replace(s[i].address.begin(), s[i].address.end(), ' ', '~');
					 file2 << s[i].name << " " << s[i].roll << " " << s[i].age << " " << s[i].clas << " " << s[i].fathers_name << " " << s[i].mothers_name << " " << s[i].address << endl;
				 }
				 MessageBox::Show("Update is done");
				 Application::Exit();

	}
	private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {

				 Teach t[100];
				 ifstream file("TeachInfo.txt");
				 cnt = 0;
				 while (file >> t[cnt].name){
					 file >> t[cnt].id;
					 file >> t[cnt].age;
					 file >> t[cnt].office_no;
					 file >> t[cnt].qualification;
					 file >> t[cnt].salary;
					 file >> t[cnt].address;
					 cnt++;
				 }
				 file.close();

				 ofstream file2("TeachInfo.txt");
				 msclr::interop::marshal_context context;
				 string  id = context.marshal_as<string >(comboBox1->Text);
				 for (int i = 0; i < cnt; i++){
					 if (t[i].id == id){
						 t[i].name = context.marshal_as<string >(textBox2->Text);

						 t[i].age = context.marshal_as<string >(textBox3->Text);

						 t[i].office_no = context.marshal_as<string >(textBox4->Text);

						 t[i].qualification = context.marshal_as<string>(textBox5->Text);

						 t[i].salary = context.marshal_as<string>(textBox6->Text);

						 t[i].address = context.marshal_as<string>(textBox7->Text);
						 MessageBox::Show("Update is done");
					 }
					 //replace with t;
					 replace(t[i].name.begin(), t[i].name.end(), ' ', '~');
					 replace(t[i].id.begin(), t[i].id.end(), ' ', '~');
					 replace(t[i].age.begin(), t[i].age.end(), ' ', '~');
					 replace(t[i].office_no.begin(), t[i].office_no.end(), ' ', '~');
					 replace(t[i].qualification.begin(), t[i].qualification.end(), ' ', '~');
					 replace(t[i].salary.begin(), t[i].salary.end(), ' ', '~');
					 replace(t[i].address.begin(), t[i].address.end(), ' ', '~');
					 file2 << t[i].name << " " << t[i].id << " " << t[i].age << " " << t[i].office_no << " " << t[i].qualification << " " << t[i].salary << " " << t[i].address << endl;
				 }
				 
				 Application::Exit();
	}
	private: System::Void button3_Click(System::Object^  sender, System::EventArgs^  e) {
				 Off o[100];
				 ifstream file("OffInfo.txt");
				 cnt = 0;
				 while (file >> o[cnt].name){
					 file >> o[cnt].id;
					 file >> o[cnt].age;
					 file >> o[cnt].office_no;
					 file >> o[cnt].qualification;
					 file >> o[cnt].salary;
					 file >> o[cnt].address;
					 cnt++;
				 }
				 file.close();

				 ofstream file2("OffInfo.txt");
				 msclr::interop::marshal_context context;
				 string  id = context.marshal_as<string >(comboBox4->Text);
				 //replace with o;
				 for (int i = 0; i < cnt; i++){
					 if (o[i].id == id){
						 o[i].name = context.marshal_as<string >(textBox17->Text);

						 o[i].age = context.marshal_as<string >(textBox16->Text);

						 o[i].office_no = context.marshal_as<string >(textBox10->Text);

						 o[i].qualification = context.marshal_as<string>(textBox12->Text);

						 o[i].salary = context.marshal_as<string>(textBox14->Text);

						 o[i].address = context.marshal_as<string>(textBox15->Text);
					 }
					 replace(o[i].name.begin(), o[i].name.end(), ' ', '~');
					 replace(o[i].id.begin(), o[i].id.end(), ' ', '~');
					 replace(o[i].age.begin(), o[i].age.end(), ' ', '~');
					 replace(o[i].office_no.begin(), o[i].office_no.end(), ' ', '~');
					 replace(o[i].qualification.begin(), o[i].qualification.end(), ' ', '~');
					 replace(o[i].salary.begin(), o[i].salary.end(), ' ', '~');
					 replace(o[i].address.begin(), o[i].address.end(), ' ', '~');
					 file2 << o[i].name << " " << o[i].id << " " << o[i].age << " " << o[i].office_no << " " << o[i].qualification << " " << o[i].salary << " " << o[i].address << endl;
				 }
				 MessageBox::Show("Update is done");
				 Application::Exit();
		
		}
		private: System::Void button5_Click(System::Object^  sender, System::EventArgs^  e) {
					 Ren r[100];
					 ifstream file3("ren.txt");
					 cnt = 0;
					 while (file3 >> r[cnt].name){
						 file3 >> r[cnt].batch;
						 file3 >> r[cnt].occupation;
						 file3 >> r[cnt].achievement;
						 cnt++;
					 }
					 file3.close();

					 ofstream file2("ren.txt");
					 msclr::interop::marshal_context context;
					 string  nm = context.marshal_as<string >(comboBox6->Text);
					 string  btc = context.marshal_as<string >(textBox21->Text);
					 for (int i = 0; i < cnt; i++){
							 if (r[i].name == nm && r[i].batch == btc){
							 r[i].occupation = context.marshal_as<string >(textBox19->Text);

							 r[i].achievement = context.marshal_as<string >(textBox18->Text);
						}
							 replace(r[i].name.begin(), r[i].name.end(), ' ', '~');
							 replace(r[i].batch.begin(), r[i].batch.end(), ' ', '~');
							 replace(r[i].occupation.begin(), r[i].occupation.end(), ' ', '~');
							 replace(r[i].achievement.begin(), r[i].achievement.end(), ' ', '~'); 
							 file2 << r[i].name << " " << r[i].batch << " " << r[i].occupation << " " << r[i].achievement << endl;
					 }
					 MessageBox::Show("Update is done");
					 Application::Exit();
		}
		
		private: System::Void button8_Click(System::Object^  sender, System::EventArgs^  e) {
					 Stu s[100];
					 ifstream file1("StuInfo.txt");
					 cnt = 0;
					 while (file1 >> s[cnt].name){
						 file1 >> s[cnt].roll;
						 file1 >> s[cnt].age;
						 file1 >> s[cnt].clas;
						 file1 >> s[cnt].fathers_name;
						 file1 >> s[cnt].mothers_name;
						 file1 >> s[cnt].address;
						 cnt++;
					 }
					 file1.close();

					 ofstream file2("StuInfo.txt");
					 msclr::interop::marshal_context context;
					 string  roll = context.marshal_as<string >(comboBox2->Text);
					 string  clas = context.marshal_as<string >(textBox20->Text);
					 for (int i = 0; i < cnt; i++){
						 if (s[i].roll == roll && s[i].clas == clas){
						 }
						 //replace with s;
						 else{
							 replace(s[i].name.begin(), s[i].name.end(), ' ', '~');
							 replace(s[i].roll.begin(), s[i].roll.end(), ' ', '~');
							 replace(s[i].age.begin(), s[i].age.end(), ' ', '~');
							 replace(s[i].clas.begin(), s[i].clas.end(), ' ', '~');
							 replace(s[i].fathers_name.begin(), s[i].fathers_name.end(), ' ', '~');
							 replace(s[i].mothers_name.begin(), s[i].mothers_name.end(), ' ', '~');
							 replace(s[i].address.begin(), s[i].address.end(), ' ', '~');
							 file2 << s[i].name << " " << s[i].roll << " " << s[i].age << " " << s[i].clas << " " << s[i].fathers_name << " " << s[i].mothers_name << " " << s[i].address << endl;
						 }
					 }
					 MessageBox::Show("Delete is done");
					 Application::Exit();
		}
		private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {
					 Teach t[100];
					 ifstream file("TeachInfo.txt");
					 cnt = 0;
					 while (file >> t[cnt].name){
						 file >> t[cnt].id;
						 file >> t[cnt].age;
						 file >> t[cnt].office_no;
						 file >> t[cnt].qualification;
						 file >> t[cnt].salary;
						 file >> t[cnt].address;
						 cnt++;
					 }
					 file.close();

					 ofstream file2("TeachInfo.txt");
					 msclr::interop::marshal_context context;
					 string  idoo = context.marshal_as<string >(comboBox1->Text);
					 for (int i = 0; i < cnt; i++){
						 if (t[i].id == idoo){ 
						 }
						 //replace with t;
						 else{
							 replace(t[i].name.begin(), t[i].name.end(), ' ', '~');
							 replace(t[i].id.begin(), t[i].id.end(), ' ', '~');
							 replace(t[i].age.begin(), t[i].age.end(), ' ', '~');
							 replace(t[i].office_no.begin(), t[i].office_no.end(), ' ', '~');
							 replace(t[i].qualification.begin(), t[i].qualification.end(), ' ', '~');
							 replace(t[i].salary.begin(), t[i].salary.end(), ' ', '~');
							 replace(t[i].address.begin(), t[i].address.end(), ' ', '~');
							 file2 << t[i].name << " " << t[i].id << " " << t[i].age << " " << t[i].office_no << " " << t[i].qualification << " " << t[i].salary << " " << t[i].address << endl;
						 }
					 }
					 MessageBox::Show("Delete is done");
					 Application::Exit();
		}
		private: System::Void button4_Click(System::Object^  sender, System::EventArgs^  e) {
					 Off o[100];
					 ifstream file("OffInfo.txt");
					 cnt = 0;
					 while (file >> o[cnt].name){
						 file >> o[cnt].id;
						 file >> o[cnt].age;
						 file >> o[cnt].office_no;
						 file >> o[cnt].qualification;
						 file >> o[cnt].salary;
						 file >> o[cnt].address;
						 cnt++;
					 }
					 file.close();

					 ofstream file2("OffInfo.txt");
					 msclr::interop::marshal_context context;
					 string  ideal = context.marshal_as<string >(comboBox4->Text);
					 //replace with o;
					 for (int i = 0; i < cnt; i++){
						 if (o[i].id == ideal){
						 }
						 else{
							 replace(o[i].name.begin(), o[i].name.end(), ' ', '~');
							 replace(o[i].id.begin(), o[i].id.end(), ' ', '~');
							 replace(o[i].age.begin(), o[i].age.end(), ' ', '~');
							 replace(o[i].office_no.begin(), o[i].office_no.end(), ' ', '~');
							 replace(o[i].qualification.begin(), o[i].qualification.end(), ' ', '~');
							 replace(o[i].salary.begin(), o[i].salary.end(), ' ', '~');
							 replace(o[i].address.begin(), o[i].address.end(), ' ', '~');
							 file2 << o[i].name << " " << o[i].id << " " << o[i].age << " " << o[i].office_no << " " << o[i].qualification << " " << o[i].salary << " " << o[i].address << endl;
						 }
					 }
					 MessageBox::Show("Delete is done");
					 Application::Exit();
		}
		private: System::Void button6_Click(System::Object^  sender, System::EventArgs^  e) {
					 Ren r[100];
					 ifstream file3("ren.txt");
					 cnt = 0;
					 while (file3 >> r[cnt].name){
						 file3 >> r[cnt].batch;
						 file3 >> r[cnt].occupation;
						 file3 >> r[cnt].achievement;
						 cnt++;
					 }
					 file3.close();

					 ofstream file2("ren.txt");
					 msclr::interop::marshal_context context;
					 string  nm = context.marshal_as<string >(comboBox6->Text);
					 string  btc = context.marshal_as<string >(textBox21->Text);
					 for (int i = 0; i < cnt; i++){
						 if (r[i].name == nm && r[i].batch == btc){
						 }
						 else{
							 replace(r[i].name.begin(), r[i].name.end(), ' ', '~');
							 replace(r[i].batch.begin(), r[i].batch.end(), ' ', '~');
							 replace(r[i].occupation.begin(), r[i].occupation.end(), ' ', '~');
							 replace(r[i].achievement.begin(), r[i].achievement.end(), ' ', '~');
							 file2 << r[i].name << " " << r[i].batch << " " << r[i].occupation << " " << r[i].achievement << endl;
						 }
					 }
					 MessageBox::Show("Update is done");
					 Application::Exit();
		}
private: System::Void button9_Click(System::Object^  sender, System::EventArgs^  e) {
			 Application::Exit();
}
private: System::Void button10_Click(System::Object^  sender, System::EventArgs^  e) {
			 Application::Exit();
}
private: System::Void button11_Click(System::Object^  sender, System::EventArgs^  e) {
			 Application::Exit();
}
private: System::Void button12_Click(System::Object^  sender, System::EventArgs^  e) {
			 Application::Exit();
}
};
}
